package com.caiyi.financial.nirvana.sms.controller;


import com.caiyi.financial.nirvana.sms.querybean.UserRechargeQueryBean;
import com.caiyi.financial.nirvana.sms.service.CustomerRechargeService;
import com.youyu.common.api.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 客户充值记录管理
 */
@Api(description = "客户充值记录管理")
@RequestMapping("sms/recharge")
@RestController
@CrossOrigin
public class CustomerRechargeController extends BaseController {

    @Autowired
    private CustomerRechargeService customerRechargeService;

    @ApiOperation(value = "充值记录列表", notes = "充值记录列表描述")
    @ApiImplicitParams({@ApiImplicitParam(name = "bean", value = "充值查询实体", required = true, dataType = "UserRechargeQueryBean", paramType = "body")
    })
    @PostMapping("/getSmsNumList")
    public Result getSmsNumList(@RequestBody UserRechargeQueryBean bean) {
        bean.setAccount(smsUser.getAccount());
        return Result.ok(customerRechargeService.getUserRechargeListByParams(bean));
    }
}
